package controllers

import "MaternalBaby/api/models"

type Feedback struct {
	BaseController
}

// @router /add [get]
func (c *Feedback) Add() {
	var m models.Feedback
	err := c.ParseForm(&m)
	if err != nil {
		c.Fail(1, err)
		return
	}

	_, err = o.Insert(&m)
	if err != nil {
		c.Fail(2, err)
		return
	}
	c.Success("")
}
